@font-face {
    font-family: 'Pinar';
    src: url('/font/Pinar-ExtraBold.woff2') format('woff2'),
        url('/font/Pinar-ExtraBold.woff') format('woff');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Pinar';
    src: url('/font/Pinar-Bold.woff2') format('woff2'),
        url('/font/Pinar-Bold.woff') format('woff');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Pinar';
    src: url('/font/Pinar-Light.woff2') format('woff2'),
        url('/font/Pinar-Light.woff') format('woff');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Pinar';
    src: url('/font/Pinar-Medium.woff2') format('woff2'),
        url('/font/Pinar-Medium.woff') format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Pinar';
    src: url('/font/Pinar-Regular.woff2') format('woff2'),
        url('/font/Pinar-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Pinar';
    src: url('/font/Pinar-SemiBold.woff2') format('woff2'),
        url('/font/Pinar-SemiBold.woff') format('woff');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0f172a;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: 0.5s ease;
}

.loader-spinner {
    width: 45px;
    height: 45px;
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-top: 3px solid #2563eb;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

html {
    scroll-behavior: smooth;
    scroll-snap-type: y proximity;
}

/* استایل مربوط به ورژن بار صفحه */

#version-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
    opacity: 1;
    visibility: visible;
    transition: opacity .4s ease, visibility .4s ease;
}

#version-popup.hidden {
    opacity: 0;
    visibility: hidden;
}

.ver-content {
    background: white;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(14px);
    border-radius: 16px;
    padding: 28px 32px;
    width: 400px;
    max-width: 90%;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    color: #e1e3e7;
    animation: popIn .5s ease;
}

@keyframes popIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.ver-content h2 {
    margin: 0 0 10px;
    color: #2563EB;
    font-size: 1.4rem;
}

.ver-content .status {
    color: #3b3e44;
    font-size: 0.9rem;
    margin-bottom: 18px;
}

.section h3 {
    font-size: 1rem;
    margin: 10px 0 4px;
    color: #2563eb;
}

.section ul {
    list-style: none;
    padding-left: 0;
    margin: 0 0 12px;
}

.section ul li {
    font-size: 0.88rem;
    color: rgb(0, 0, 0);
    margin: 3px 0;
    line-height: 1.5;
}

#close-popup {
    background: linear-gradient(145deg, #2563eb, #0f172a);
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    color: #ffffff;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

#close-popup:hover {
    background: radial-gradient(circle at top left, #0f172a, #2563eb);
    color: #fff;
    box-shadow: 0 0 15px rgba(130, 220, 255, 0.4);
    transition: all 1.5s ease;
}

/* ===== حالت موبایل ===== */
@media (max-width: 600px) {
    #version-popup {
        align-items: flex-end;
    }

    .ver-content {
        width: 100%;
        border-radius: 18px 18px 0 0;
        padding: 24px 20px;
        margin: 0;
    }

    h2 {
        font-size: 1.2rem;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Pinar';
    text-decoration: none;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 50px 60px;
}

.floating-controls {
    position: fixed;
    left: 20px;
    /* چون سایت فارسیه سمت چپ بهتره */
    bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 999;
}

.float-btn {
    width: 45px;
    height: 45px;
    border: none;
    border-radius: 50%;
    background: #f2f2f2;
    cursor: pointer;
    font-size: 18px;
    transition: 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.616);
}

.float-btn:hover {
    transform: translateY(-4px);
}



/* دکمه اسکرول اول مخفیه */
.scroll-top {
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
}

.scroll-top.show {
    opacity: 1;
    pointer-events: auto;
}

/* دارک مود */
body.dark .float-btn {
    background: #1e1e1e;
    color: #fff;
}

body {
    overscroll-behavior: none;
    background: #f8fafc;
    color: #0f172a;
    transition: background 0.8s, color 0.8s;
}

/* Chrome, Edge */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #2563eb;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0f172a;
}

/* دیزاین هدر */
.header {
    padding-top: 30px;
}

.header-inner {
    width: calc(100% - 40px);
    max-width: 1400px;
    margin: auto;
    padding: 16px 24px;
    background: #ffffff;
    color: #0f172a;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.308);
}

/* تیتر هدر */
.logo {
    font-size: 20px;
    color: #0f172a;
    transition: all 0.9s;
}

.logo:hover {
    transform: scale(1.2);
    transition: all 0.9s;
}

body.dark .logo {
    color: white;
}

/* منوی هدر */
.nav-links {
    list-style: none;
    display: flex;
    gap: 50px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-links a {
    color: #334155;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #2563eb;
}

.nav-links a::after {
    content: "";
    position: absolute;
    right: 0;
    width: 0%;
    height: 2px;
    background: #2563eb;
    left: 0;
    bottom: -10px;
    /* فاصله از متن */
    transition: width 0.5s;
}

.nav-links a:hover::after {
    width: 100%;
}

/* لینک فعال (Active page) */
.nav-links a.active {
    color: #2563eb;
    /* رنگ لینک فعال */
}

.nav-links a.active::after {
    width: 100%;
    background: #2563eb;
}

/* کنترل های سایت | زبان، روشنایی */
.controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ===== دیزاین بخش تغییر زبان ===== */
.lang-switch {
    position: relative;
    display: flex;
    width: 110px;
    height: 36px;
    background: #1e293b;
    border-radius: 18px;
    overflow: hidden;
}

.lang-switch button {
    flex: 1;
    background: transparent;
    border: none;
    color: #cbd5f5;
    cursor: pointer;
    z-index: 2;
    font-weight: bold;
}

.lang-switch button.active {
    color: #0f172a;
}

.lang-slider {
    position: absolute;
    width: 50%;
    height: 100%;
    background: #38bdf8;
    border-radius: 18px;
    transition: transform 0.3s ease;
    z-index: 1;
}

/* ===== دیزاین دکمه روشنایی ===== */
.theme-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #1e293b;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s, background 0.3s, color 0.3s;
}

.theme-btn:hover {
    transform: rotate(20deg);
}

/* دیزاین حالت دارک مود */
body.dark {
    background: #020617;
    color: white;
}

body.dark .header-inner {
    background: #020617;
    color: white;
    box-shadow: 0 10px 60px #2564eb44;

}

body.dark .nav-links a {
    color: #cbd5f5;
}

body.dark .nav-links a:hover {
    color: white;
}

body.dark .lang-switch button.active {
    color: #020617;
}

body.light .lang-switch button.active {
    color: #ffffff;
}

body.dark .theme-btn {
    background: #facc15;
    color: #020617;
}

body.dark .social-icons a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2563eb;
    border-radius: 50%;
    transition: 0.3s;
    color: inherit;
    text-decoration: none;
}

body.dark .footer h3 {
    color: #ffffff;
}

body.dark .footer {
    position: relative;
}

body.dark .footer::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(to left,
            transparent,
            rgb(255, 255, 255),
            transparent);
}




/* کانتینر و وسط‌چین */
.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}


.about-section {
    bottom: 50px;
    color: #0f172a;
}

.about-hero {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
}

.about-image img {
    width: 320px;
    max-width: 100%;
    height: auto;
    border-radius: 20px;
}

.about-text {
    flex: 1;
}

.about-text h1 {
    font-size: 38px;
    margin-bottom: 20px;
    text-align: start;
}

.about-text p {
    line-height: 1.9;
    margin-bottom: 16px;
    color: #334155;
    text-align: justify;
}

.about-story,
.about-projects,
.about-values {
    margin-top: 100px;
}

.about-story h2,
.about-projects h2,
.about-values h2 {
    font-size: 28px;
    margin-bottom: 25px;
}

.about-story p,
.about-values p,
.projects-desc {
    line-height: 1.9;
    color: #475569;
    margin-bottom: 18px;
}

.project-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    padding: 30px;
    border-radius: 18px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    transition: 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-10px);
    background: linear-gradient(45deg, #2563eb, #0f172a);
    cursor: pointer;
    color: white;
    transition: all 0.9s ease;
}

body.dark .stat-card:hover {
    transform: translateY(-10px);
    background: linear-gradient(45deg, #2563eb, #0f172a);
    cursor: pointer;
    color: white;
    transition: all 0.9s ease;
}

.stat-card h3 {
    font-size: 28px;
    margin-bottom: 8px;
}

/* ===== Dark Mode ===== */

body.dark .about-section {
    color: white;
}

body.dark .about-text p,
body.dark .about-story p,
body.dark .about-values p,
body.dark .projects-desc {
    color: #cbd5e1;
}

body.dark .stat-card {
    background: #1e293b;
    box-shadow: none;
}



.footer {
    padding: 30px 0 40px;
    border-top: 1px solid rgba(0, 0, 0, 0.253);
    direction: start;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 60px;
}

.footer h3 {
    font-size: 22px;
    margin-bottom: 30px;
    color: #0f172a;
}

.footer p {
    opacity: 0.7;
    line-height: 2;
    text-align: justify;
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    text-decoration: none;
    color: inherit;
    opacity: 0.7;
    transition: 0.3s;
}

.footer-links a:hover {
    opacity: 1;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f2f2f2;
    border-radius: 50%;
    transition: 0.3s;
    color: inherit;
    text-decoration: none;
}

.social-icons a:hover {
    transform: translateY(-5px);
}

.contact-phone {
    margin-top: 20px;
}

.contact-phone a {
    margin-top: -20px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    opacity: 0.8;
    transition: 0.3s;
    font-size: 14px;
}

.contact-phone a:hover {
    opacity: 1;
}

.footer-bottom {
    margin-top: 30px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    text-align: center;
    font-size: 14px;
    opacity: 0.6;
}

.footer-bottom p {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
}

/* ریسپانسیو */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .social-icons {
        justify-content: center;
    }
}


.has-dropdown {
    position: relative;
}

/* --- استایل‌های مربوط به زیرمنو --- */

.desktop-nav .has-dropdown {
    position: relative;
    /* برای موقعیت‌دهی absolute زیرمنو */
}

.desktop-nav .dropdown-toggle {
    background: none;
    border: none;
    padding: 0;
    /* حذف padding پیش‌فرض */
    color: inherit;
    /* رنگ را از nav-link به ارث می‌برد */
    font-size: inherit;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.desktop-nav .dropdown-toggle .arrow {
    font-size: 0.8em;
    /* اندازه آیکون فلش */
    transition: transform 0.3s ease;
    /* انیمیشن چرخش */
    margin-left: 8px;
    /* فاصله بین متن و آیکون */
    display: inline-block;
    /* برای اعمال transition */
}

/* زیرمنو (لیست آیتم‌ها) */
.desktop-nav .dropdown {
    position: absolute;
    top: 100%;
    /* زیر دکمه اصلی قرار می‌گیرد */
    right: 0;
    /* در سمت راست هم‌تراز می‌شود */
    background-color: #ffffff;
    color: #0f172a;
    /* رنگ پس‌زمینه زیرمنو (تم تیره) */
    border-radius: 8px;
    list-style: none;
    padding: 15px;
    margin-top: 6px;
    min-width: 180px;
    /* حداقل عرض زیرمنو */
    display: none;
    /* پنهان در حالت پیش‌فرض */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    /* سایه برای عمق بیشتر */
    animation: fadeInDropdown 0.25s ease forwards;
    /* انیمیشن باز شدن */
    z-index: 1000;
    /* اطمینان از روی بقیه عناصر بودن */
}

body.dark .desktop-nav .dropdown {
    background-color: #0f172a;
    color: white;
}

/* استایل آیتم‌های داخل زیرمنو */
.desktop-nav .dropdown li {
    margin: 0;
}

.desktop-nav .dropdown a {
    color: #0f172a;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 6px;
    display: block;
    /* برای پر کردن عرض */
    white-space: nowrap;
    /* جلوگیری از شکستن متن */
    transition: background-color 0.25s ease, transform 0.25s ease;
}

.desktop-nav .dropdown a:hover {
    background-color: #005eff;
    color: white;
    /* رنگ پس‌زمینه در حالت هاور */
    /* افکت حرکت کوچک */
}

/* نمایش زیرمنو وقتی والد آن کلاس 'open' دارد */
.desktop-nav .has-dropdown.open .dropdown {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* چرخش فلش در حالت باز شده */
.desktop-nav .has-dropdown.open .arrow {
    transform: rotate(180deg);
    /* چرخش ۱۸۰ درجه برای نشان دادن بسته شدن */
}

/* انیمیشن fade-in برای زیرمنو */
@keyframes fadeInDropdown {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* اگر استایل active دارید، برای آیتم های دراپدان هم مشابه اعمال کنید */
.desktop-nav .dropdown a.active {
    background-color: #005eff;
}

.nav-link .arrow {
    font-size: 0.8em;
    margin-left: 8px;
    /* فاصله از متن */
    /* استایل‌های دیگه در صورت نیاز */
}


.mobile-menu {
    display: none;
}

.menu-toggle {
    display: none;
}



@media screen and (max-width: 1000px) {

    /* ===== هدر موبایل ===== */
    header {
        width: 100%;
        padding: 14px 16px;
        border-radius: 0;
        margin: 0;

    }

    .header-inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        z-index: 1;
    }

    footer .footer-about,
    footer .footer-links,
    footer .footer-social {
        display: none;
    }

    .footer {
        border-top: 0px solid rgba(0, 0, 0, 0.253);
    }

    /* ===== منوی دسکتاپ کاملاً مخفی ===== */
    .desktop-nav {
        display: none !important;
    }

    /* ===== لوگو + کنترل‌ها ===== */
    .logo-area {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .logo-area h1 {
        font-size: 16px;
        white-space: nowrap;
    }

    /* دکمه زبان و دارک مود */
    .controls {
        display: none;
        gap: 6px;
    }

    .lang-switch,
    .theme-toggle {
        height: 34px;
        min-width: 34px;
        border-radius: 8px;
        font-size: 13px;
    }



    .about-section {
        flex-direction: column;
        text-align: justify;
    }

    .about-hero {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }

    .about-image img {
        width: 220px;
    }

    .about-text h1 {
        font-size: 26px;
    }


    .menu-toggle {
        display: block;
        order: 2;
        font-size: 26;
    }

    .nav {
        display: none;
    }

    .mobile-menu {
        font-family: 'Pinar';
        position: fixed;
        top: 0;
        left: 0;
        width: 100dvw;
        height: 100dvh;
        overflow-y: auto;
        /* این مهمه */

        background: #0f172a;

        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;

        transform: translateX(100%);
        transition: 0.4s ease;
        z-index: 99999;
    }

    .mobile-menu.active {
        transform: translateX(0);
        color: #00e0ff;
    }

    /* آیتم‌ها */
    .menu-items {
        width: 80%;
        max-width: 400px;
    }

    .menu-items a {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        /* 👈 فاصله آیکن و متن */

        background: #2563eb;
        border-radius: 12px;
        padding: 15px;
        margin: 15px 0;

        text-decoration: none;
        color: white;
        font-size: 18px;

        transition: 0.3s;
    }



    /* دکمه بستن */
    .close-menu {
        gap: 8px;
        font-family: 'Pinar';
        margin-top: 40px;
        padding: 12px 30px;
        background: #ffffff;
        color: #2563eb;
        font-weight: bold;
        border: none;
        border-radius: 8px;
        font-size: 16px;
        cursor: pointer;
    }


    /* ===== فاصله محتوا از منوی پایین ===== */
    main {
        padding-bottom: 90px;
        margin: 0 20px 0 20px;
        padding: 80px 20px;
    }

    body {
        padding-bottom: 70px;
    }

    .hero-container {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }

    .hero-content {
        text-align: center;
    }

    .hero-image img {
        width: 180px;
        height: 180px;
    }

    .hero-title {
        font-size: 26px;
    }
}